﻿@{
    Layout = null;
}
@Content.Script(Url, "Demo/Demo.js");


<button class="btn btn-success" onclick="$.MGJ.Demo.Dialog_Add()">
    <i class="glyphicon glyphicon-plus"></i>
    新增
</button>
 

<div class="text-center" style="clear:both;">
    <div style=" padding-left:0px">
        <table class="table table-hover table-bordered" style="table-layout:fixed">
            <thead>
                <tr>
                  
                    <th class="text-center">ID</th>
                    <th class="text-center">名称</th>
                    <th class="text-center">年级</th>
                    <th class="text-center" style="width:200px;">操作</th>

                </tr>
            </thead>
            <tbody id="DemoTable" style="display:none;" binding="{'pageId':'ShoppingPager','pageCallback':'$.MGJ.Demo.Ajax_PageList','emptyHtml':OMID_EmptyHtml}">
                <tr>
                   
                    <td binding="{'text':'ID'}"></td>
                    <td binding="{'text':'name'}" data-toggle="tooltip"></td>
                    <td binding="{'text':'TID'}" data-toggle="tooltip"></td>
                    <td>
                        <a binding="{'DemoID':'ID'}" onclick="$.MGJ.Demo.Dialog_Edit(this)">编辑</a>
                        <a binding="{'DemoID':'ID'}" onclick="$.MGJ.Demo.DelDemo(this)">删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <div id="ShoppingPager"></div>
    </div>
</div>
<script>
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.OMID_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';
    $(function ()
    {
        $.MGJ.Demo.Ajax_PageList(1,"");
    })
</script>
 